package com.itheima;

import com.itheima.service.ImpL.UserServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class web {
    public static void main(String[] args) {
        //初始化ioc容器
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        //获取bean对象
        UserServiceImpl userSericer = (UserServiceImpl) ctx.getBean("UserSericer");
        UserServiceImpl userSericer1 = (UserServiceImpl) ctx.getBean("UserSericer1");
        userSericer.add();
    }
}
